//控制输入框 focus blur
	$("input").live("focus",function(){
		var $this = $(this);
		$this.removeAttr("checkStatus");
		var def = $this.attr("default");
		if($this.val() == def){
			$this.val("");
		}
		showTip($this,3,def);
	}).live("blur",function(){
		var $this = $(this);
		var def = $this.attr("default");
		if($this.val() == ""){
		//	$this.val(def);
		}
	}); 
	
	/**
	 * type 0 清除提示 1 正确 2 错误 3 提示 
	 * $obj 需要提示的对象input
	 * msg显示的信息
	 * iconcss icon对应名称
	 * force 强制使用iconcss设置, 该参数废弃
	 * type=3提示信息，如果msg是空，则不作操作
	 * force =true 设置成iconcss，不设置msg
	 * icocss 不为空 则以icocss作为图标，msg作为提示内容
	 * tag icon样式的父节点
	 */
	function showTip($obj,type,msg,icocss,force,tag){
		if(!$obj){return ;}
		if(!type){type = 0;}
		if(!msg){msg = "";}
		if(type == 3 && !msg){
			return ;
		}
		if(!tag){
			tag = "li";
		}
		var $em = $obj.closest(tag).find(".icon");
		$em.removeClass().addClass("icon");
		if(icocss){
			$em.addClass(icocss);
			var clone$em = $em.clone(true);
			$em.parent().empty().append(clone$em ).append(msg);
			return ;
		}
		if(type == 1){
			$em.addClass("icon_right");
		}else if(type == 2){
			$em.addClass("icon_err");
		}else if(type == 3){
			$em.addClass("icon_in");
		}else if(type == 0){
		}
		//$em.parent().remove(":not('.icon')").append(msg);
		var clone$em = $em.clone(true);
		$em.parent().empty().append(clone$em ).append(msg);
	}
	function showSteamRegTip($obj,type,msg){
		showTip($obj,type,msg,"",false,"dl");
	}
	
/*点击统计*/
var trackEvent = function(k, v) {
	try {
	 _mtxq.push(["_trackActionEvent",k,v]);
 } catch(e) { }
}
//单次统计
var trackEventOnce = (function(){
	var json = {};
	return function(k,v){
		if(!json[k]){
			json[k] = true;
			trackEvent(k,v);
		}
	}
})();
//手机号错误统计
var trackPhoneError = (function(){
	var json = {};
	return function(){
		var p = $('#cellphoneId').val();
		if(!json[p]){
			json[p] = true;
			trackEvent('32511','dota2_reg_mobile_repeat');
		}
	}
})();